﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
namespace Admin.NET.Application.Entity;

/// <summary>
/// 设备管理
/// </summary>
[SugarTable("iotdevice","设备管理")]
[Tenant("1300000000001")]
public class Iotdevice  : EntityBase
{
    /// <summary>
    /// 设备名称
    /// </summary>
    [Required]
    [SugarColumn(ColumnName = "DeviceName", ColumnDescription = "设备名称", Length = 64)]
    public string DeviceName { get; set; }
    
    /// <summary>
    /// 产品ID
    /// </summary>
    [Required]
    [SugarColumn(ColumnName = "ProductId", ColumnDescription = "产品ID")]
    public long ProductId { get; set; }
    
    /// <summary>
    /// 产品名称
    /// </summary>
    [Required]
    [SugarColumn(ColumnName = "ProductName", ColumnDescription = "产品名称", Length = 64)]
    public string ProductName { get; set; }
    
    /// <summary>
    /// 设备编号
    /// </summary>
    [Required]
    [SugarColumn(ColumnName = "SerialNumber", ColumnDescription = "设备编号", Length = 64)]
    public string SerialNumber { get; set; }
    
    /// <summary>
    /// 子设备网关编号
    /// </summary>
    [SugarColumn(ColumnName = "GwDevCode", ColumnDescription = "子设备网关编号", Length = 64)]
    public string? GwDevCode { get; set; }
    
    /// <summary>
    /// 固件版本
    /// </summary>
    [Required]
    [SugarColumn(ColumnName = "FirmwareVersion", ColumnDescription = "固件版本")]
    public double FirmwareVersion { get; set; }
    
    /// <summary>
    /// 设备状态（1-未激活，2-禁用，3-在线，4-离线）
    /// </summary>
    [Required]
    [SugarColumn(ColumnName = "Status", ColumnDescription = "设备状态（1-未激活，2-禁用，3-在线，4-离线）")]
    public int Status { get; set; }
    
    /// <summary>
    /// 物模型值
    /// </summary>
    [SugarColumn(ColumnName = "ThingsModelValue", ColumnDescription = "物模型值")]
    public object? ThingsModelValue { get; set; }
    
    /// <summary>
    /// 设备所在地址
    /// </summary>
    [SugarColumn(ColumnName = "NetworkAddress", ColumnDescription = "设备所在地址", Length = 255)]
    public string? NetworkAddress { get; set; }
    
    /// <summary>
    /// 设备入网IP
    /// </summary>
    [SugarColumn(ColumnName = "NetworkIp", ColumnDescription = "设备入网IP", Length = 32)]
    public string? NetworkIp { get; set; }
    
    /// <summary>
    /// 设备经度
    /// </summary>
    [SugarColumn(ColumnName = "Longitude", ColumnDescription = "设备经度")]
    public double? Longitude { get; set; }
    
    /// <summary>
    /// 设备纬度
    /// </summary>
    [SugarColumn(ColumnName = "Latitude", ColumnDescription = "设备纬度")]
    public double? Latitude { get; set; }
    
    /// <summary>
    /// 激活时间
    /// </summary>
    [SugarColumn(ColumnName = "ActiveTime", ColumnDescription = "激活时间")]
    public DateTime? ActiveTime { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [SugarColumn(ColumnName = "Remark", ColumnDescription = "备注", Length = 500)]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 创建者部门Id
    /// </summary>
    [SugarColumn(ColumnName = "CreateOrgId", ColumnDescription = "创建者部门Id")]
    public long? CreateOrgId { get; set; }
    
    /// <summary>
    /// 创建者部门名称
    /// </summary>
    [SugarColumn(ColumnName = "CreateOrgName", ColumnDescription = "创建者部门名称", Length = 64)]
    public string? CreateOrgName { get; set; }
    
}
